<div class="problemindexholder" problemindex="B">
 <div class="ttypography">
  <div class="problem-statement">
   <div class="header">
    <div class="title">
     B. Five-In-a-Row
    </div>
    <div class="time-limit">
     <div class="property-title">
      time limit per test
     </div>
     1 second
    </div>
    <div class="memory-limit">
     <div class="property-title">
      memory limit per test
     </div>
     256 megabytes
    </div>
    <div class="input-file">
     <div class="property-title">
      input
     </div>
     standard input
    </div>
    <div class="output-file">
     <div class="property-title">
      output
     </div>
     standard output
    </div>
   </div>
   <div>
    <p>
     Alice and Bob play 5-in-a-row game. They have a playing field of size
     <span class="tex-span">
      10 × 10
     </span>
     . In turns they put either crosses or noughts, one at a time. Alice puts crosses and Bob puts noughts.
    </p>
    <p>
     In current match they have made some turns and now it's Alice's turn. She wonders if she can put cross in such empty cell that she wins immediately.
    </p>
    <p>
     Alice wins if some crosses in the field form line of length
     <span class="tex-font-style-bf">
      not smaller than
      <span class="tex-font-style-tt">
       5
      </span>
     </span>
     . This line can be horizontal, vertical and diagonal.
    </p>
   </div>
   <div class="input-specification">
    <div class="section-title">
     Input
    </div>
    <p>
     You are given matrix
     <span class="tex-span">
      10 × 10
     </span>
     (
     <span class="tex-font-style-tt">
      10
     </span>
     lines of
     <span class="tex-font-style-tt">
      10
     </span>
     characters each) with capital Latin letters
     <span class="tex-font-style-tt">
      'X'
     </span>
     being a cross, letters
     <span class="tex-font-style-tt">
      'O'
     </span>
     being a nought and
     <span class="tex-font-style-tt">
      '.'
     </span>
     being an empty cell. The number of
     <span class="tex-font-style-tt">
      'X'
     </span>
     cells is equal to the number of
     <span class="tex-font-style-tt">
      'O'
     </span>
     cells and there is at least one of each type. There is at least one empty cell.
    </p>
    <p>
     It is guaranteed that in the current arrangement nobody has still won.
    </p>
   </div>
   <div class="output-specification">
    <div class="section-title">
     Output
    </div>
    <p>
     Print
     <span class="tex-font-style-tt">
      'YES'
     </span>
     if it's possible for Alice to win in one turn by putting cross in some empty cell. Otherwise print
     <span class="tex-font-style-tt">
      'NO'
     </span>
     .
    </p>
   </div>
   <div class="sample-tests">
    <div class="section-title">
     Examples
    </div>
    <div class="sample-test">
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>XX.XX.....<br/>.....OOOO.<br/>..........<br/>..........<br/>..........<br/>..........<br/>..........<br/>..........<br/>..........<br/>..........<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>YES<br/></pre>
     </div>
     <div class="input">
      <div class="title">
       Input
      </div>
      <pre>XXOXX.....<br/>OO.O......<br/>..........<br/>..........<br/>..........<br/>..........<br/>..........<br/>..........<br/>..........<br/>..........<br/></pre>
     </div>
     <div class="output">
      <div class="title">
       Output
      </div>
      <pre>NO<br/></pre>
     </div>
    </div>
   </div>
  </div>
  <p>
  </p>
 </div>
</div>
